package o;

import android.text.TextUtils;
import android.webkit.WebView;
import com.huawei.appgallery.share.api.ShareBean;
import java.lang.ref.WeakReference;

public class eni implements Runnable {
    private ShareBean ˎ;
    private String ˏ;
    private WeakReference<WebView> ॱ;

    public eni(WebView webView, String str, ShareBean shareBean) {
        this.ॱ = new WeakReference(webView);
        this.ˏ = str;
        this.ˎ = shareBean;
    }

    public void run() {
        try {
            WebView webView = (WebView) this.ॱ.get();
            if (this.ˎ == null || webView == null || TextUtils.isEmpty(this.ˏ)) {
                Logger.ˎ("LoadHtmlRunnable", "loadHtmlContent some thing is null.");
                return;
            }
            webView.loadUrl("javascript:window.HiSpaceObject.onPageLoaded('<html>' + document.getElementsByTagName('html')[0].innerHTML + '</html>', \"" + dnk.ˏ(this.ˏ.getBytes("UTF-8")) + "\",'" + this.ˎ.toJson() + "');");
        } catch (Exception e) {
            Logger.ˋ("LoadHtmlRunnable", "loadHtmlContent error");
        }
    }
}
